<template>
    <div>
        <capital-fund-task-detail-component :comptParams="comptParams" @on-item-check="onItemCheck"></capital-fund-task-detail-component>
        <Modal v-model="modal1" :scrollable="true" width=1000 :styles="{top: '20px'}" @on-cancel="closeModal">
            <capital-fund-task-detail-component :comptParams="modalComptParams">
            </capital-fund-task-detail-component>
        </Modal>
    </div>
</template>

<script>
import capitalFundTaskDetailComponent from './capital-fund-task-detail-component.vue'

export default {
  components: {
    capitalFundTaskDetailComponent
  },
  data () {
    return {
      modal1: false,
      comptParams: {// 传递给taskDetailComponent的参数对象
        isModal: false,
        type: ''
      },
      modalComptParams: {// 传递给taskDetailComponent的参数对象
        isModal: null
      }
    }
  },
  methods: {
    onItemCheck (loanId) {
      this.modal1 = true
      this.modalComptParams.isModal = true
      this.modalComptParams.curLoanId = loanId
    },
    closeModal () {
      this.modalComptParams.isModal = false
    }
  },
  computed: {

  },
  mounted () {

  },
  created () {
    var params = this.$route.query
    this.comptParams.type = params.type
    if (params && params.loanId) {
      this.comptParams.curLoanId = params.loanId
    }
  },
  watch: {

  }
}
</script>
